package com.yxkj.sms;

import android.app.Application;

/**
 * Created by zyh on 2017/4/17.
 */

public class MyApplication extends Application {

    private static MyApplication mApplication;//test

    public static MyApplication Instance() {
        return mApplication;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mApplication = this;
        setExceptionHandler();  // 程序异常不崩溃
    }


    /**
     * 记录异常崩溃信息日志
     */
    private void setExceptionHandler() {
        CrashHandler crashHandler = CrashHandler.getInstance();
        crashHandler.init(this);
        Thread.setDefaultUncaughtExceptionHandler(crashHandler);
    }

}